package com.juyu.miliao.scheduler.service;

import com.juyu.miliao.scheduler.dao.mysql.LabelDao;
import com.juyu.miliao.scheduler.domin.Label;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LabelCacheService {
    @Resource
    private LabelDao labelDao;
    /***
     * 查询label列表
     * 放入缓存中
     * @return
     */
    @Cacheable(value = "timeout-cache-labelCache-scheduler")
    public List<Label> getLabelList(){
        return labelDao.getLabelList();
    }
}
